<?php

class m140523_041000_tbl_user extends CDbMigration
{
	public function up()
	{
        $this->createTable('tbl_user', array(
            'id' => 'pk',
            'username' => 'char(64) not null',
            'password' => 'char(32) not null',
            'email' => 'varchar(64) NOT NULL',
            'create_date' => 'date',
            'update_date' => 'date',
            'last_login' => 'date',
            'is_online' => 'char(1)',
            'validate_code' => 'varchar(32)',
            'validate_type' => 'varchar(32)',
            'validate_type' => 'char(1)',
            'type' => 'char(1) default 3',
            'status' => 'int(11)'
        ));
	}

	public function down()
	{
		echo "m140523_041000_tbl_user does not support migration down.\n";
		return false;
	}

	/*
	// Use safeUp/safeDown to do migration with transaction
	public function safeUp()
	{
	}

	public function safeDown()
	{
	}
	*/
}